package 面试.OOM;/*
 *@Author: helen
 *@Date:   2021/4/16 16:02
 *@Description:
 */

import java.util.Random;

public class JavaHeapSpaceDemo {
    //-Xms5m -Xmx5m
    public static void main(String[] args) {
        Byte[] b = new Byte[80*1024*1024];
        //Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    }
}
